<template lang="">
    <div>
         <el-table :data="memberList"  border  style="width: 100%">
    <el-table-column  prop="id"  label="用户编号"  width="80">  </el-table-column>
    <el-table-column   prop="nickname"   label="昵称"  width="180"></el-table-column>
    <el-table-column  prop="phone"  label="手机号"> </el-table-column>
      <el-table-column prop="status" label="状态"> 
     <template slot-scope="item">
    <div>
        <el-tag v-if="item.row.status == 1 " type="success">启用</el-tag>
        <el-tag v-else type="danger">禁用</el-tag>
        <!-- {{item.row.status == 1 ? "启用" : "禁用" }} -->
    </div>
  </template>
   </el-table-column>
   <el-table-column  label="操作">
    <template slot-scope="item">
          <div>
          <el-button type="primary"  size="mini" @click="edit(item.row.id)" >编辑</el-button>
          </div>
        </template>
     </el-table-column>
  </el-table>
    </div>
</template>
<script>
import { mapActions,mapGetters } from 'vuex'
export default {
    data() {
        return {}
    },
    computed:{
        ...mapGetters({
            memberList:'member/getMemberList'
        })
    },
    mounted() {
        // 触发列表行动调用
        this.getMenber()
    },
    methods: {
        ...mapActions({
            getMenber:'member/changeMemberListActions'
        }),
        edit(id){
            this.$emit('edit',id)
        }
    },
}
</script>
<style lang="">
    
</style>